﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CoderJoe.WoW.Services;

namespace CoderJoe.WoW.GearManager.Views
{
	public partial class MainForm : Form
	{
		protected Workspace Workspace { get; private set; }

		public MainForm(Workspace workspace)
		{
			Workspace = workspace;

			InitializeComponent();

			CharacterController controller = Workspace.Resolve<CharacterController>();
			CharacterView view = controller.GetCharacterView();
			view.Dock = DockStyle.Fill;
            this.splitContainer1.Panel1.Controls.Add(view);
		}

		protected override void OnLoad(EventArgs e)
		{
			CharacterController controller = Workspace.Resolve<CharacterController>();
			controller.RefreshModel("Medivh", "Essiaa");

			base.OnLoad(e);
		}

		private void loadFromArmoryToolStripMenuItem_Click(object sender, EventArgs e)
		{
			LoadCharacterController loadController = Workspace.Resolve<LoadCharacterController>();
			loadController.Show();
		}
	}
}
